package com.novartis.nims.util;

import java.io.InputStream;

public class ResourceAccess {
	
	//look in system for specified resource. if not found, look in package.
	//returns an InputStream object or null if no resource with this name is found
	public static InputStream getResourceAsStream(Class source, String name) {
		InputStream is = source.getResourceAsStream("/" + name);
		if (is == null) {
			is = source.getResourceAsStream(name);
		}
		return is;
	}

}
